/*
 * Copyright 2018- The Pixie Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

syntax = "proto3";

package experimental;

message DNSHeader {
  uint32 txid = 1;
  uint32 flags = 2;
  uint32 num_queries = 3;
  uint32 num_answers = 4;
  uint32 num_auth = 5;
  uint32 num_addl = 6;
}

message DNSRequest {
  message DNSQuery {
    string name = 1;
    string type = 2;
  }

  uint64 time_stamp_ns = 1;
  DNSHeader header = 2;
  repeated DNSQuery queries = 3;
}

message DNSResponse {
  message DNSAnswer {
    string name = 1;
    string type = 2;
    string addr = 3;
  }

  uint64 time_stamp_ns = 1;
  DNSHeader header = 2;
  repeated DNSAnswer answers = 3;
}

message DNSRecord {
  DNSRequest req = 1;
  DNSResponse resp = 2;
}
